import request from "../../../utils/request";
import { commentData, CommentsResponseData, ArrayData } from "./type";
enum API {
    // 分页接口 POST
    GETCOMMENTSINFO_URL = '/commentInfo/commentPage',
    // 删除评论 DELETE
    DELETECOMMENT_URL = '/commentInfo/commentDel',
    // 批量删除评论 DELETE 参数是一个数组
    DELETESCOMMENTS_URL = '/commentInfo/commentDelBatch'
}
export const reqGetCommentInfo = (data: commentData) => request.post<any, CommentsResponseData>(API.GETCOMMENTSINFO_URL, data)
export const reqDeleteComment = (id: number) => request.delete<any, any>(API.DELETECOMMENT_URL + `?id=${id}`)
export const reqDeletesComments = (data: ArrayData) => request.delete<any, any>(API.DELETESCOMMENTS_URL, { data })
